New York City is infamous for the rats that live among us. Our apartments, buildings, subway stations, trash cans, parks, and streets are home to millions of rats and other rodents. For many New Yorkers, rats are an inevitable part of everyday life, and one that has worsened in recent years. This year alone (2022), New York’s Sanitation Department has reported more than 21,600 rat complaints. This represents a 71% increase since October 2020. The issue has gotten so bad that Mayor Adams is now looking to hire a “bloodthirsty” director of rodent mitigation, who is eligible to make up to $228,000. Given the prevalence of rats in this city and the recent urgency of the issue, this project primarily seeks to explore trends in rat sightings across New York City.
Further, research shows that exposure to rodents is associated with various diseases and poor health outcomes, including asthma symptoms. Asthma symptoms have been increasing in middle to high-income countries, making this issue ever more critical . Understanding it can aid public health and health care combat diseases from these exposures. The Asthma and Allergy Foundation of America examines the ways in which it is particularly an issue among communities that are historically and continually oppressed through racism and classism because they live in environments with higher levels of exposure due to air pollution, old buildings, cigarette smoke, and other factors. This project secondarily seeks to explore associations between rodent infestations and asthma prevalence in New York City.
A 2019 study examined what neighborhoods are “rat hotspots.” It focused on data from 2010 to 2017. It looked at changes in number of sightings over the years as well as sightings by neighborhood. In 2016 there was a peak in the number of sightings. Brooklyn seemed to have the most sightings compared to other NYC boroughs. And they mostly occurred in 3+ family apartment buildings. The study also looked at high density areas - for example parts of the Upper West Side had a higher density of sightings compared to the Upper East Side. We will explore similar topics, using current data for 2022.
This project is motivated by the following questions:
This project uses two main datasets for our analysis.
Rat Sightings
The Rat Sightings data is from NYC OpenData. This dataset includes information for all rat-related 311 service requests from 2010 to the present. We stored the data [locally? G drive?] since it was too large to upload to github. To clean the data, we changed the created_date variable from MM/DD/YYYY HH:MM into separate “month,” “day,” and “year” variables; made the year variable numeric; corrected capitalization for address_type, city, and borough; recoded values for clarity; and filtered to remove observations in unspecified boroughs. After cleaning the data, our key variables are:
Asthma
The Asthma Data is from the New York State Asthma Dashboard. The asthma data set includes information on asthma rates in NYC. To clean the data, we renamed variables for clarity, updated variable types, and grouped information by year and borough. After cleaning, key variables include:
For our statistical analyses, we also merged the Rat Sightings and Asthma datasets by year and borough.
To better understand trends in rat sightings in NYC, we conducted some exploratory analysis using data visualization.
First, we plotted rat sightings over time. Next, we explored the distribution of rat sighting frequency by borough and over time. Then, we explored top location types of rat sightings (i.e. apartment versus street versus park). Finally, we mapped rat sightings across the city using a density map.
First, we wanted to get a sense of rat sighting trends over time. The following line graph shows how the number of sightings have changed over time:

Based on the plot, we see that rat sightings have generally increased since 2010, except for a brief decline between 2017 and 2020. Since 2020, the number of rat sightings in NYC has sharply increased.
With a better understanding of general trends, we wanted to explore rat sighting trends over time by borough. The following line graph shows how the number of sightings has changed over time, color-coded by borough:

Based on the plot, we see that the Bronx, Brooklyn, Manhattan, and Queens generally follow similar trends as NYC overall. Of these boroughs, the Bronx deviates the most, showing a decrease in rat sightings since 2021. Staten Island is different from all other boroughs and NYC overall. Rat sightings there have remained steady, and low, since 2010.
The following bar graph shows the distribution of rat sighting frequency by borough between 2010 and 2022:

The plot shows that Brooklyn has the most rat sightings overall, with more than 70,000 sightings reported. Staten Island has the least number of sightings, with less than 10,000 sightings reported.
This bar graph shows the distribution of rat sighting frequency by borough for each year with available data.

Since 2010, the overall frequency ranking of each borough has remained the same: from least to greatest, Staten Island, Queens, The Bronx, Manhattan, and Brooklyn. Since 2020, sightings have increased most significantly in Manhattan and Brooklyn. With the Bronx’s decrease since 2021, the Bronx and Queens are nearly tied so far in 2022.
The bar graph shows the distribution of rat sightings frequency by location type.

Overall, 3+ family apartment buildings had the highest number of sightings followed by 1-2 family dwellings. Of the top 10 location types, parking lots/garages had the lowest.
The following bar graph shows the distribution of the number of sightings by top sighting locations by borough:

In all boroughs except Queens and Staten Island, the highest number of sightings were in 3+ family apartment buildings. In Queens and Staten Island, the highest number of sightings were in 1-2 family dwellings.
Finally, we mapped rat sightings across NYC by density:
As expected, we see rat sightings all over the city, with more rat sightings occurring in higher-density areas in the high-sighting boroughs identified in our previous plots.
Next, we wanted to get a sense of asthma trends in New York City.
The line graph shows the total number of ER visits related to asthma per year in NYC.

Overall the total number of asthma-related ER visits rises steadily. We see zero visits in 2015 because the dataset had no data for that year.
The line graph compares age-adjusted ER asthma rates over time to the estimated ER asthma rate.

This allowed us to see that there was little difference between the two variables.
The bar graph shows the mean ER asthma rates by borough through 2018.

The Bronx has the highest asthma rate, followed by Manhattan and Brooklyn. Queens has the lowest rate.
The bar graph shows the mean ER asthma rates by borough over time.

The Bronx has the highest asthma rate, followed by Manhattan and Brooklyn. Queens has the lowest rate. The distribution of rates generally remains the same as what we saw in the overall mean asthma rate by borough. However, over time, we see that Brooklyn surpasses Manhattan’s asthma rate.
Finally, we wanted to start looking at associations between the two datasets. The side-by-side line plots show the mean age-adjusted asthma-related ER visits rate per 10,000 next to rat sightings over time.

From 2010 through 2018, as the age-adjusted rate of asthma decreased (especially after 2014) while rat sightings increased.
We wanted to run some statistical tests and models to see if there were any significant associations between rat sightings and asthma rates.
We used a linear regression model to describe the relationship between asthma rates and rat sightings. Age-adjusted asthma-related ER visit rates per 10,000 grouped by year were used as the dependent variable. The total number of rat sightings per year and the year were used as predictor variables.
## # A tibble: 3 × 5
## term estimate std.error statistic p.value
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 (Intercept) -3425. 4643. -0.738 0.502
## 2 n_rat_sightings -0.00425 0.00207 -2.05 0.109
## 3 year 1.78 2.32 0.769 0.485
The slope coefficient for the total number of rat sightings per year was -4.25e-03, but it was found to be insignificant at the 95% confidence level as the p-value was 0.11 (>0.05). Thus, we fail to reject the null hypothesis and conclude that there is no association between asthma rates and rat sightings at the 0.05 level of significance, while controlling for years.
Next, we checked the following assumptions underlying this linear regression model to determine its validity.
Testing Liner Relationship

Testing whether the residuals are normally distributed


Testing Homoscedasticity

##
## studentized Breusch-Pagan test
##
## data: asthma_rat_mod
## BP = 3.6938, df = 2, p-value = 0.1577
This project primarily sought to explore trends in rat sightings across New York City. Previous studies and projects looked at what neighborhoods were “rat hotspots.” We wanted to explore similar topics using the most current data on rat sightings across New York City.
Given the increasing number of complaints over the years and the renewed political urgency of this issue, we expected to see an upwards trend in overall rat sightings across the board. This was true for all boroughs as seen in the plots in this report. As reported in previous studies, Brooklyn continues to have the highest number of rat sightings among all the boroughs. Moreover, 3+ family apartment buildings had the highest number of sightings.
We also wanted to explore associations between rodent infestations and asthma related outcomes as research suggests that rodent infestations are associated with various poor health outcomes, including asthma symptoms. Using a linear regression model, we looked at the relationship between rat sightings and age-adjusted asthma-related ER visits per 10,000 individuals. We found a negative association between rat sightings and our asthma health outcome. However, this association was not statistically significant at the 95% level. To further determine our model’s validity, we ran a few more statistical tests, the results of which are discussed on this page.
Overall, while we did not expect to see a negative relationship between rat sightings and asthma related ER visits, we recognize that our analysis had several limitations:
We recommend including other factors that are associated with both rat sightings and asthma rates in future projects/analyses and also using larger sample sizes to have more confidence in the statistical validity of the results. Moreover, we only looked at ER hospitalizations for asthma; other asthma related health outcomes such as prevalence or looking at outcomes among specific populations like children or older adults could be potential improvements to this project.